#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 2e5 + 5;
const int MOD = 9901;

int n, m;
int a, b;
int fastpow(int b, int p) {
  b %= MOD;
  int res = 1;
  while (p) {
    if (p & 1) res = res * b % MOD;
    b = b * b % MOD;
    p >>= 1;
  }
  return res;
}
int f(int b, int p) {
  b %= MOD;
  if (p == 0) return 1;
  int res = 0;
  if ((p & 1) == 0) res = fastpow(b, p), p--;
  int x = f(b, p / 2), y = fastpow(b, p / 2 + 1);
  res = (res + x * (1 + y)) % MOD;
  return res;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> a >> b;
  if (a == 0) {
    cout << 0;
    return 0;
  }
  int res = 1;
  for (int i = 2; i * i <= a; i++) {
    if (a % i) continue;
    int p = 0;
    while (a % i == 0) p += b, a /= i;
    res = res * f(i, p) % MOD;
  }
  if (a != 1) res = res * f(a, b) % MOD;
  cout << res;
  return 0;
}